package com.yuyou.fn.analyze.service;

import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.analyze.vo.*;
import com.yuyou.fn.educational.vo.SimpleQueryVo;
import com.yuyou.fn.platform.entity.SysUser;
import com.yuyou.fn.platform.permission.DataPermission;
import com.yuyou.fn.settlement.entity.MainAccount;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/9/5.
 */
public interface IDataStatisticsService {

    TeacherContinueReadVo findTeacherContinueRead(Long teacherId,Long periodId,Integer bigLectureNum);

    List<StudentReadState> findStudentReadState(Long teacherId,Long classId);


    List<StudentReadState> findSeniorStudentReadState(Long seniorId,Long periodId);

    ClassStudentReadState findClassStudentReadState(Long teacherId,Long classId,Integer bigLectureNum);

    List<MainAccount> findByAreaTeamId(List<Long> areaTeamIds,Long userId);

    List<Long> findPermissionBusTeam(List<Long> areaTeamIds,Long userId);

    List<Long> filterBusTeamByPermissions(List<Long> busTeamIdList,Long userId);

    Map<String,List<DataVo>> findBusTeamByAreaTeamId(Long areaTeamId, Date startDate, Date endDate);


    Map<String,List<DataVo>> findProductByAreaTeamId(Long areaTeamId, Date startDate, Date endDate, SysUser sysUser);


    RecentDetailVo findBusTeamRecentDetail(Long areaTeamId, Date date, int monthNum);


    RecentDetailVo findProdcutRecentDetail(Long areaTeamId,Date date,int monthNum,SysUser sysUser);


    List<MainAccountCostAndIncome> findBusTeamTargetAndReal(Long areaTeamId,Long periodId);


    List<ProductCostAndIncomeVo> findProductTargetAndReal(Long areaTeamId,Long periodId,SysUser sysUser);

    /*key=gradeFullClassRateList年级满班率，productFullClassRateList 产品线满班率*/
    Map<String,List<FullClassRate>> findFullRate(Long areaTeamId, Long periodId,Long userId);

    List<BusTeamFullClassRate> findBusTeamFullClassRate(List<Long> busTeamIds,List<Long> periodIds,List<Long> gradeIds,List<Long> subjectIds,Long areaTeamId);


    SXSSFWorkbook exportBusTeamFullClassRate(List<Long> busTeamIds,List<Long> periodIds,List<Long> gradeIds,Long areaTeamId);

    List<AreaTeamFullClassRate> findAreaTeamFullClassRate(Long areaTeamId,List<Long> busTeamIds,List<Long> periodIds,List<Long> gradeIds,List<Long> subjectIds);

    BusTeamPeriodClassRegNumVo findBusTeamPeriodClassRegNumVo(long areaTeamId,long busTeamId,long periodId);

    Page<ClassAvgRegVo> findClassAvgReg(DataPermission dataPermission,SimpleQueryVo simpleQueryVo, int pageNo, int pageSize);

    SXSSFWorkbook exportClassAvgReg(DataPermission dataPermission,SimpleQueryVo simpleQueryVo);

    void fullClassForbidSetting(ClassForbiddenPropertiesVo classForbiddenPropertiesVo,Long areaTeamId);

    Map<String,String> getFullClassForbidSettingMap(Long areaTeamId);
}
